/**
 * 服务层统一导出
 * 所有服务都从这里导出，便于管理和使用
 */

// 导出基础服务
export { BaseService} from './base-service'
// API错误格式
export interface ApiError {
  code?: string | number
  message: string
  data?: any
}
export { apiConfig, ApiConfig } from './api-config'

// 导入具体服务实例
import { authService } from '../../auth/services/auth-service'    
import { aiService } from './ai-service'
import { promptService } from '../../prompt/services/prompt-service'
import { mcpService } from './mcp-service'
import { bookAnalysisService } from '../../book/services/book-analysis-service'
import { novelOutlineApi } from '../../book/services/novel-outline-service'
import { bookService } from '../../book/services/book-service'
import { inspirationService } from '../../book/services/inspiration-service'
import { chapterContentApi } from '../../book/services/chapter-content-service'
import { bookSettingService } from '../../book/services/setting-service'

// 导出具体服务类型和实例
export { AuthService, authService, type LoginParams, type RegisterParams } from '../../auth/services/auth-service'
export type { UserInfo } from '../../../types/api'
export { AiService, aiService, type AIModel, type ChatParams, type KnowledgeBase, type KnowledgeDocument } from './ai-service'
export { PromptService, promptService, type PromptTemplate, type PromptTemplateParams } from '../../prompt/services/prompt-service'
export { MCPService, mcpService, type MCP, type MCPTool, type MCPPageParams } from './mcp-service'
export { BookAnalysisService, bookAnalysisService, type BookAnalysisRecord, type BookAnalysisResult, type CreateRecordRequest, type UpdateRecordRequest, type RecordStatusResponse, type WebSocketMessage } from '../../book/services/book-analysis-service'
export { novelOutlineApi, type NovelOutlineRequest, type ChapterOutline, type CharacterProfile, type NovelPlan } from '../../book/services/novel-outline-service'
export { bookService, type Book, type BookQueryParams } from '../../book/services/book-service'
export type { PageResult } from './base-service'
export { inspirationService, type Inspiration, type InspirationQueryParams } from '../../book/services/inspiration-service'
export { chapterContentApi, type ChapterContent } from '../../book/services/chapter-content-service'
export { bookSettingService, type BookSetting, type BookSettingQueryParams } from '../../book/services/setting-service'

// 导出WebSocket服务
export { webSocketService, useWebSocket, useWebSocketVue, type TaskProgress, type TaskStatus, type TaskCompletion, type TaskFailure } from './websocket-service'

// 导出服务实例（便于直接使用）
export const services = {
  auth: authService,
  ai: aiService,
  prompt: promptService,
  mcp: mcpService,
  bookAnalysis: bookAnalysisService,
  novelOutline: novelOutlineApi,
  book: bookService,
  inspiration: inspirationService,
  chapterContent: chapterContentApi,
  setting: bookSettingService
}

// 默认导出服务实例
export default services